#ifndef __IMAGE_BPEER__
#define __IMAGE_BPEER__

typedef struct {
//      unsigned short  bftype;
        unsigned int    bfsize;
        unsigned short  bfreserved1;
        unsigned short  bfreserved2;
        unsigned int    bfoffbits;
}Bitmapfileheader;

typedef struct {
        unsigned int    bisize;
        unsigned int    bitwidth;
        unsigned int    bitheight;
        unsigned short  biplanes;
        unsigned short  bibitcount;
        unsigned int    bicompression;
        unsigned int    bisizeimage;
        unsigned int    bixpelspermeter;
        unsigned int    biypelspermeter;
        unsigned int    biclrused;
        unsigned int    biclrimportant;
}Bitmapinfoheader;

typedef struct {
        unsigned char   rgbblue;
        unsigned char   rgbgreen;
        unsigned char   rgbred;
        unsigned char   rgbreserved;
}Rgbquad;

typedef struct {
        int     width;
        int     height;
        int     channel;
}Image;


int read_bmp_info(char* name, Image *img);
int read_bmp_data(char* name, unsigned char* buff, Image *img);


#endif

